from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains
import time

d = webdriver.Chrome()
d.get('https://www.qq.com/')
yaowen = d.find_element(By.XPATH,'/html/body/div[1]/div[4]/div[1]/div[2]/div/div[2]/div/ul[1]/li[1]/a')
biaoti = yaowen.text
print(biaoti)
yaowen.click()
all_windows = d.window_handles
d.switch_to.window(all_windows[1])
e = d.find_element(By.CSS_SELECTOR,'[class="content-article"]')
neirong = e.text
print(neirong)